package com.yeban.base.day03.homework;

import java.util.Scanner;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/9/27
 */
public class Test02 {

    public static void main(String[] args) {

        // 提示输入数字
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入一个数字：");
        int num = sc.nextInt();

        // 把数倒过来
        int sum = 0;
        while(num > 0) {
            sum = sum * 10 + num % 10;
            num /= 10;
        }

        System.out.println("翻转后数字为：" + sum);
    }
}
